﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OracleClient;
using DBUtility;

namespace OracleDAL.Sec
{
     public  class Top
    {
        public DataSet getMenu()
        {
            DataSet ds = new DataSet();
            //   string sql = "select operateid,menuname,pageurl,imgurl,levelcode from sec_main_menu where length(levelcode)='4' order by levelcode asc";
            string sql = "select operateid as operateid,operatename as menuname,operateurl as pageurl,imgurl as imgurl,treeorder  as levelcode from sec_operate_new  where length(treeorder)='4' order by treeorder asc";
            return OracleHelper.Query(sql);
        }
        public DataSet getNextMenu(string whereSql)
        {
            DataSet ds = new DataSet();
            // string sql = "select operateid,menuname,pageurl,imgurl,levelcode from sec_main_menu where levelcode like '" + whereSql+ "__' order by levelcode asc";

            string sql = "select operateid as operateid,operatename as menuname,operateurl as pageurl,imgurl as imgurl,treeorder  as levelcode from sec_operate_new where treeorder like '" + whereSql + "__' order by treeorder asc";
            return OracleHelper.Query(sql);
        }
    }
}
